-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explain how HTTP header fields integrate with URL patterns #230
Conversation
Per discussion on whatwg#182 some text explaining this would be useful.
@domenic @annevk does this address the concern in #182 (comment)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with editorial nit.
Co-authored-by: Domenic Denicola <d@domenic.me>
spec.bs
Outdated
@@ -2049,6 +2054,24 @@ If a specification has an Infra value (e.g., after using [=parse a JSON string t | |||
|
|||
Specifications may wish to leave room in their formats to accept options for {{URLPatternOptions}}, override the base URL, or similar, since it is not possible to construct a {{URLPattern}} object directly in this case, unlike in a JavaScript API. For example, <cite>Speculation Rules</cite> accepts a "`relative_to`" key which can be used to switch to using the [=document base URL=] instead of the JSON resource's URL. [[SPECULATION-RULES]] | |||
|
|||
<h3 id=other-specs-http>Integrating with HTTP header fields</h3> | |||
|
|||
HTTP headers which include URL patterns should accept a string in the constructor string syntax, likely as part of a structured field [[RFC8941]]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "constructor string syntax"? Is this talking about the URLPattern
constructor which it below says should not be relied upon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It refers to the syntax that is accepted when a single string is passed to the constructor (i.e., is accepted by the constructor string parser), as opposed to the pattern syntax for a single component.
It could be renamed something else, but this is how the spec currently refers to that syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the syntax is defined somewhere and you can xref it that seems reasonable. Otherwise it seems rather opaque to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added links to the constructor string parsing section.
Per discussion on #182 some text explaining this would be useful.
This mostly consists of advice since the useful algorithms are already exposed.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff